﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TP01.TP
{
    class Conjugate
    {
        public static string ConjugatePronoun(string Pronoun, string verb)
        {
            if (verb.EndsWith("er"))
            {
                if (Pronoun == "je" || Pronoun == "il" || Pronoun == "elle")
                {
                    return verb.Replace("er", "e");
                }
                if (Pronoun == "tu")
                {
                    return verb.Replace("er", "es");
                }
                if (Pronoun == "nous")
                {
                    return verb.Replace("er", "ons");
                }
                if (Pronoun == "vous")
                {
                    return verb.Replace("er", "ez");
                }
                if (Pronoun == "ils" || Pronoun == "elles")
                {
                    return verb.Replace("er", "ent");
                }
            }
            else 
            {
                if (Pronoun == "je" || Pronoun == "tu")
                {
                    return verb.Replace("ir", "is");
                }
                if (Pronoun == "il" || Pronoun == "elle")
                {
                    return verb.Replace("ir", "it");
                }
                if (Pronoun == "nous")
                {
                    return verb.Replace("ir", "issons");
                }
                if (Pronoun == "vous")
                {
                    return verb.Replace("ir", "issez");
                }
                if (Pronoun == "ils" || Pronoun == "elles")
                {
                    return verb.Replace("ir", "issent");
                }
            }
            return "";
        }
        public static List<string> ConjugateVerb(string verb)
        {
            List<string> output = new List<string>();

                if (verb.EndsWith("er"))
                {
                    output.Add(verb.Replace("er", "e ") + verb.Replace("er", "es ") + verb.Replace("er", "e ") + verb.Replace("er", "ons ") + verb.Replace("er", "ez ") + verb.Replace("er", "ent "));
                }
                else if (verb.EndsWith("ir"))
                {
                    output.Add(verb.Replace("ir", "is ") + verb.Replace("ir", "is ") + verb.Replace("ir", "it ") + verb.Replace("ir", "issons ") + verb.Replace("ir", "issez ") + verb.Replace("ir", "issent "));
                }
                else { }

            return output;
        }
    }
}
